#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <error.h>
#include <string.h>
#include <sys/utsname.h>

int adduanme ()
{
    int z;
    struct utsname u_name;
    z = uname(&u_name);

    if (z < 0)
    {
        fprintf(stderr, "%s: uname(2)", strerror(errno));
        exit(1);
    }

    printf(" sysname[] = '%s'", u_name.sysname);

}


#include <iostream>
#include <unistd.h>
#include <stdlib.h>
#include <string>
#include <error.h>
#include <sys/utsname.h>

using namespace std;

int main()
{
    int z;
    struct utsname u_name;
    z = uname(&u_name);

    if (z < 0)
    {
        std::cout << "error" << std::endl;
        exit(1);
    }

    std::cout << u_name.sysname  << std::endl;
    std::cout << u_name.machine  << std::endl;
    std::cout << u_name.nodename  << std::endl;
    std::cout << u_name.release  << std::endl;
    std::cout << u_name.version  << std::endl;
}
